<template>
    <div class="demo">
        <h2>学生名字为：{{myName}}</h2>
        <br/>
        <h2>学生年龄为：{{myAge}}</h2>
        <br/>
        <button @click="test">点我提示信息</button>
    </div>
</template>

<script>
export default {
    name:'Student',
    data() {
        return {
            myName:'张三',
            myAge:18
        }
    },
    methods: {
        test(){
            alert('Hello，欢迎来到'+this.schoolName)
        }
    },
}
</script>

<style>
.demo{
    background-color: orange;
}
</style>